@import "./variables/common";

$prefix-cls: $tab-bar-prefix-cls;

.#{$prefix-cls}-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    .#{$prefix-cls}, .#{$prefix-cls}-no-line {
        display: flex;
        flex-flow: row nowrap;
        justify-content: space-around;
        align-items: center;
        width: $width-default;
        height: $height-tab-bar;
        position: relative;
        margin: 0 auto;
        padding: 0;
        box-sizing: border-box;
        background: $color-tab-bar;
        color: $color-text;
        text-align: center;
        overflow: hidden;
        font-size: $font-size-xxx-small;
        user-select: none;
        .#{$prefix-cls}-item {
            width: $width-default;
            height: $height-default;
            cursor: pointer;
            .#{$prefix-cls}-item-content {
                width: $width-default;
                height: $height-default;
                display: flex;
                flex-flow: column nowrap;
                justify-content: center;
                align-items: center;
            }
        }
        .#{$prefix-cls}-selected {
            animation: #{$prefix-cls}-selected-animation $transition-time linear 1 forwards;
        }
    }
    .#{$prefix-cls}::after {
        position: absolute;
        content: '';
        left: -50%;
        top: 0;
        width: $width-default * 2;
        height: 1px;
        background: $color-border;
        transform: scale(.5);
    }
}

@keyframes #{$prefix-cls}-selected-animation {
    from {
        color: $color-text;
    }
    to {
        color: $color-theme;
    }
}
